<layout name='../Layout/frame_main' />

<body>
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      .sidebar-nav {
        padding: 9px 0;
      }

      @media (max-width: 980px) {
        /* Enable use of floated navbar text */
        .navbar-text.pull-right {
          float: none;
          padding-left: 5px;
          padding-right: 5px;
        }
      }
    </style>
    <script type="text/javascript">
  $(function(){
    $('#infoform').submit(function(){
      var f=$(this)[0];
      if(f.adm_name.value=='')
      {
        alert('用户名不能为空！');
        return false;
      }
      if(f.adm_oldpass.value!='')
      {
        if(f.adm_pass[0].value=='' || f.adm_pass[1].value=='')
        {
          alert('若想更改密码，新密码不能为空！或者旧密码不填写且新密码也不填写！');
          return false;
        }
      }
      if(f.adm_pass[0].value!='' || f.adm_pass[1].value!='')
      {
        if(f.adm_oldpass.value=='')
        {
        alert('修改密码需要验证旧密码，请填写旧密码！');
        return false;
        }
      }
      if(f.adm_pass[0].value!=f.adm_pass[1].value)
      {
        alert('两次密码输入不一致，请重新输入！');
        return false;
      }
    });
  })
  </script>
    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="javascript:location.reload();">校园代理管理平台</a>
          <div class="nav-collapse collapse">
            <p class="navbar-text pull-right">
              用户名：<font color="red">{$adm.adm_realname}</font> <a href="__APP__/Admin/Index/Logout/" class="navbar-link">退出</a>
            </p>
          </div>
        </div>
      </div>
    </div>

  <div class="container-fluid">
    <div class="row-fluid">
	   
      <div class="span3" >
      <div class="well sidebar-nav">
  <ul class="nav nav-list">
  	<li class="nav-header">
		信息录入
	</li><li><a href="javascript:CreatFrame('newp')">录入信息</a></li>
	
	<li class="nav-header">
		产品与订单
	</li>
	<li><a href="javascript:CreatFrame('allp')">所有产品</a></li>
	<li><a href="javascript:CreatFrame('allo')">所有订单</a></li>
	<li><a href="javascript:CreatFrame('allo',0)">所有未审订单</a></li>
	<li><a href="javascript:CreatFrame('allo',1)">所有已审订单</a></li>
	<li class="nav-header">	大类汇总</li>
	<volist name="big_type" id="vo" empty="暂时没有数据" >
  	<li>
	<a href="javascript:CreatFrame('allo','{$vo.type_id}',1)">{$vo.type_name}</a>
	</li>
    </volist>
	<li class="nav-header">客户汇总	</li>
	<li><a href="javascript:CreatFrame('allc')">所有客户</a></li>
  <li class="nav-header">我的业务 </li>
  <li><a data-toggle="modal" href="#myEdit">我的信息</a></li>
  <li><a href="javascript:CreatFrame('info')">查看用户</a></li>
  <li><a href="javascript:CreatFrame('type')">管理分类</a></li>
  <li><a href="javascript:CreatFrame('role')">管理权限</a></li>
</ul>
       </div>
      </div><!--/span-->
	<div id='iCenter' class='span9'>
	    
	</div>
  
	
    </div><!--/row-->
      <hr>
      <footer>
        <p>&copy; Company 2013</p>
      </footer>

  </div><!--/.fluid-container-->
              <form id="infoform" action="__APP__/Admin/Info/ada" method='post'>
                <div id="myEdit" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-header">
                      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                      <h3 id="myModalLabel">我的信息</h3>
                    </div>
                    <div class="modal-body">
                      <div class="container-fluid">
                      <div class="row-fluid">
                        <div class="span12">
                          <div class="row-fluid">
                            <div class="span8">
                              <input type="hidden" name="adm_id"  value='{$adm.adm_id}' />
                              <input type="hidden" name="adm_role"  value='{$adm.adm_role}' />
                              <span class='cn_name'>登陆角色&nbsp;</span>
                              <span class='cn_val'>
                              <input type="text" disabled name="rol_name"  value='{$adm.rol_name}' />
                              </span><br/>  

                              <span class='cn_name'>登陆名称&nbsp; </span><span class='cn_val'><input disabled type="text" name="adm_name"  value='{$adm.adm_name}' /></span><br/>

                              <span class='cn_name'>真实名称&nbsp; </span><span class='cn_val'><input type="text" name="adm_realname" value='{$adm.adm_realname}' />
                              </span><br/>

                              <span class='cn_name'>原始密码&nbsp; </span><span class='cn_val'><input type="password" name="adm_oldpass" value='' /></span><br/>

                              <span class='cn_name'>新&nbsp;&nbsp;密&nbsp;&nbsp;码&nbsp; </span><span class='cn_val'><input type="password" name="adm_pass" value='' /></span><br/>

                              <span class='cn_name'>确认密码&nbsp; </span><span class='cn_val'><input type="password" name="adm_pass" value='' /></span><br/>

                            </div>
                            <div class="span4">
                              <span class="cn_name">手机号</span>
<span style="width: 164px;">
<input type="text" style="width: 145px; border-top-width: 1px; margin-top: 10px;" value="{$adm.adm_phone}" name="adm_phone">
</span>
<span class="cn_name">QQ 号</span>
<span style="width: 164px;">
<input type="text" name="adm_qq" value="{$adm.adm_qq}" style="width: 145px; border-top-width: 1px; margin-top: 10px;">
</span>
                              <h3>注意：</h3>
                              如果修改密码，必须填写原始密码！
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    </div>
                    <div class="modal-footer">
                      <button class="btn" data-dismiss="modal" aria-hidden="true" id="clbtn{$vo.adm_id}">关闭</button>
                      <button class="btn btn-primary" type="submit">确认</button>
                    </div>
                </div>
              </form>
</body>

<script type="text/javascript">
function CreatFrame(action,param,type){
var src='__APP__/Admin/';
var p='';
if(action=='info')
{
  src+='Info/';
}
else
{
    if(typeof param!="undefined")
    {
    	if(type!=1)
      p='order_status/'+param;
    	else if(action=='allo')
      p='type/'+param;	
    }
    src+='Manage/'+action+'/'+p;
}
$('#iCenter').html('<iframe id="right_iframe" src="'+src+'" frameborder="0"  name="news"   width=100%   height=550  frameborder=no   scrolling=no style="text-align:center"></iframe>');
} 
function ShowMyInfo()
{

}
CreatFrame('newp');
</script>

